﻿using Caliburn.Micro;
using System.Windows.Controls;
using System.Windows.Input;
using ThunderboltInterfaceSharp.Views.UserControls;

namespace ThunderboltInterfaceSharp.ViewModels.UserControls.More;

public class MoreViewModel:Screen
{
	public MoreViewModel()
	{
	
	}

	public void StackPanelPreviewMouseWheel(MouseWheelEventArgs e)
	{
		//为了将滚动事件传递给ScrollViewer
		e.Handled = false;
	}

	//Preview是隧道事件，从底层到上层
	public void ScrollViewerPreviewMouseWheel(object sender, MouseWheelEventArgs e)
	{
		e.Handled = true;
		var scrollViewer = (ScrollViewer)sender;
		scrollViewer.ScrollToVerticalOffset(scrollViewer.VerticalOffset - e.Delta);
	}

}